@extends('base')
@section('title', 'Collections')
@section('csses')

@endsection
@section('content')
<div class="main_l2 container" style="padding: 0px 12px;">
	<div class="col-md-8 col-xs-12" style="margin-bottom: 20px; border: 1px solid #ddd;">

		@if (count($collections) == 0)
		<b>当前还没有虚拟专辑</b>
		@else
			@foreach($collections as $collection)
				
				<div class="collections col-md-6 col-xs-12" style="{{ !$loop->last ? 'border-bottom: 1px dotted #ddd' : '' }}">
					<div class="col-md-5 c-cover" ><img class="img-responsive" src="{{ asset('uploads/' . $collection->cover) }}"></div>
					<div class="col-md-7 c-info">
						<h3>{{ $collection->getName() }}</h3>
						<div class="c-abstract">{{ str_limit($collection->getAbstract(), 80, '...') }}</div>
						<div class="c-sta">
							Articles: {{ $collection->getArticleCount() }}&nbsp;&nbsp;&nbsp;
							Browse: {{ $collection->view_count }}
						</div>
						<a class="btn btn-xs btn-warning" href="{{ route('collection.article', ['id' => $collection->id]) }}">查看详情</a>
					</div>
					
				</div>
			@endforeach
		@endif
	</div>
	<div class="col-md-4 col-xs-12 main_r">
		
	<div class="main_r1">
      <div class="col-md-6 col-xs-6 main_pic  ">
        <a class="image-popup-vertical-fit" href="{{ asset('uploads/' . $issue->cover)   }}">
          <img src="{{ asset('uploads/' . $issue->cover) }}" width="150">
        </a>
      </div>
      <div class="col-md-6 col-xs-6 main_url">
        <a href="{{ url()->current() }}"><strong><span class="font-col">Current Issue</span> </strong> </a><br>
        {{ $issue->year }}, Volume {{ $issue->volume }} Issue {{ $issue->issue }}<br>
        <br>
      </div>
	</div>
	
</div>
@endsection